package com.consumer2.controller;

import com.provider2.api.GetNumApi;
import com.provider2.param.Param1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class testController {

    @Autowired
    private GetNumApi restFulService;


    @RequestMapping(value = "/consumer/getNum", method = RequestMethod.GET)
    public String getRandomInt() {
        Param1 param1=new Param1();
        param1.setName("12312313");
        return restFulService.getRandomInt(param1).toString();
    }
    @RequestMapping(value = "/consumer/getNum2", method = RequestMethod.GET)
    public String getRandomInt1() {

        return "1";
    }
}
